package Package.Example.Example_5;

import java.io.*;
import java.net.Socket;

public class Example_5 {
    public static void Example_5() throws IOException {
        Socket s=new Socket("192.168.8.103",10086);
        BufferedReader br=new BufferedReader(new FileReader("D:\\insert\\Example.txt"));
        BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));
        String line;
        while ((line=br.readLine())!=null){
            bw.write(line);
            bw.newLine();
            bw.flush();
        }
        s.shutdownOutput();
        BufferedReader brs=new BufferedReader(new InputStreamReader(s.getInputStream()));
        String line1=brs.readLine();
        System.out.println(line1);
        br.close();
        s.close();
        bw.close();
    }
}
